class ProjectPlan < ActiveRecord::Base
  mount_uploader :plan, PlanUploader
  default_scope { where(:deleted_at => nil) }
  default_scope { order(id: :desc) }

  PER_PAGE = 10
  paginates_per PER_PAGE

  has_one :project
  
  # 虚拟字段
  # 获取项目
  def post_project
    return Project.find(self.project_id)
  end

end
